//
//  PullRefreshHeaderView.h
//  KYPullRefreshTableHeader
// 下拉刷新
//  Created by wesleyxiao on 14-3-17.
//  Copyright (c) 2014年 wesleyxiao. All rights reserved.
//

#import <UIKit/UIKit.h>
#include <QuartzCore/QuartzCore.h>
//下拉刷新
typedef enum{
	PullRefreshPulling = 0,
	PullRefreshNormal,
	PullRefreshLoading,
} PullRefreshState;

@protocol RefreshHeaderDelegate ;
@interface PullRefreshHeaderView : UIView
{
    id delegate;
	PullRefreshState _state;
	UILabel *_lastUpdatedLabel;
	UILabel *_statusLabel;
	CALayer *_arrowImage;
	UIActivityIndicatorView *_activityView;
}


- (void)refreshLastUpdatedDate;
- (void)refreshScrollViewDidScroll:(UIScrollView *)scrollView;
- (void)refreshScrollViewDidEndDragging:(UIScrollView *)scrollView;
- (void)refreshScrollViewDataSourceDidFinishedLoading:(UIScrollView *)scrollView;

@property (nonatomic,strong) id<RefreshHeaderDelegate> delegate;


@end


@protocol RefreshHeaderDelegate

- (void)refreshTableHeaderDidTriggerRefresh:(PullRefreshHeaderView*)view;              //刚触发刷新
- (BOOL)refreshTableHeaderDataSourceIsLoading:(PullRefreshHeaderView*)view;     //正在触发
@optional
- (NSDate*)refreshTableHeaderDataSourceLastUpdated:(PullRefreshHeaderView*)view;
@end